package eos.dom.server;

import java.util.Vector;

import javax.jdo.annotations.Element;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class Hand {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	@Persistent
	@Element(dependent="true")
	private Vector<Integer> handCards;
	
	public Hand(){
		handCards = new Vector<Integer>();
	}
	
	public void setHandCards(Vector<Integer> handCards) {
		this.handCards = handCards;
	}
	public Vector<Integer> getHandCards() {
		return handCards;
	}
	public boolean isEmpty() {
		return handCards.isEmpty();
	}
	public int size() {
		return handCards.size();
	}
	public Integer get(int i) {
		return handCards.get(i);
	}
	public Integer remove(int i) {
		return handCards.remove(i);
	}
	public void add(Integer card) {
		handCards.add(card);
	}

}
